//
//  UserDefinedCellForRepairItemListView.m
//  HondaPro_2
//
//  Created by Eric on 13-6-4.
//  Copyright (c) 2013年 glendale. All rights reserved.
//

#import "UserDefinedCellForRepairItemListView.h"

@interface UserDefinedCellForRepairItemListView ()

@end

@implementation UserDefinedCellForRepairItemListView

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        
        [self addLabel1ToCell];
        [self addLabel2ToCell];
        [self addLabel3ToCell];
        [self addLabel4ToCell];
        [self addLabel6ToCell];
        [self addLabel7ToCell];
        [self addLabel8ToCell];
        [self addLabel9ToCell];
        
        self.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

#pragma mark - 给自定义cell添加label

-(void)addLabel1ToCell
{
    self.label1= [self createLabelWithFrame:CGRectMake(0, 0, 40, 50) textAlign:UITextAlignmentCenter];
}

-(void)addLabel2ToCell
{
    self.label2= [self createLabelWithFrame:CGRectMake(42, 0, 85-10, 50) textAlign:NSTextAlignmentLeft];
}

-(void)addLabel3ToCell
{
    self.label3= [self createLabelWithFrame:CGRectMake(128-10, 0, 135+100, 50) textAlign:NSTextAlignmentLeft];
}

-(void)addLabel4ToCell
{
    self.label4= [self createLabelWithFrame:CGRectMake(264+90, 0, 60, 50) textAlign:NSTextAlignmentLeft];
}

-(void)addLabel5ToCell
{
    self.label5= [self createLabelWithFrame:CGRectMake(325+90, 0, 60, 50) textAlign:NSTextAlignmentLeft];
}

-(void)addLabel6ToCell
{
    self.label6= [self createLabelWithFrame:CGRectMake(386+90, 0, 70, 50) textAlign:NSTextAlignmentLeft];
}

-(void)addLabel7ToCell
{
    self.label7= [self createLabelWithFrame:CGRectMake(457+90, 0, 70, 50) textAlign:NSTextAlignmentLeft];
}

-(void)addLabel8ToCell
{
    self.label8= [self createLabelWithFrame:CGRectMake(528+90, 0, 90-30, 50) textAlign:NSTextAlignmentLeft];
}

-(void)addLabel9ToCell
{
    self.label9= [self createLabelWithFrame:CGRectMake(619+60, 0, 60, 50) textAlign:NSTextAlignmentLeft];
}

-(void)addLabel10ToCell
{
    self.label10= [self createLabelWithFrame:CGRectMake(680+60, 0, 100-40, 50) textAlign:NSTextAlignmentLeft];
}

-(void)addLabel11ToCell
{
    self.label11= [self createLabelWithFrame:CGRectMake(781+20, 0, 96-20, 50) textAlign:NSTextAlignmentLeft];
}

-(UILabel *)createLabelWithFrame:(CGRect)frame textAlign:(NSTextAlignment)textAlign{
    UILabel *lbl= [[UILabel alloc] init];
    lbl.backgroundColor = [UIColor clearColor];
    lbl.frame = frame;
    lbl.font = [UIFont systemFontOfSize:13];
    lbl.textColor = [UIColor darkGrayColor];
    lbl.numberOfLines = 2;
    lbl.textAlignment = textAlign;
    [self.contentView addSubview:lbl];
    return lbl;
}

@end
